<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ page language="java" import="recommenRatings.domain.*,java.util.*"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%
	String placeID = request.getParameter("pid");
	PlaceManager pm = new PlaceManager();
	Place p = pm.getPlace(placeID); //TODO
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Informacion de <%=p.getName()%></title>
</head>
<body>
<table summary="Listado de Lugares">
	<br>

	<tr>
		<td>Nombre:<%=p.getName()%></td>
		<td>Precio medio:<%=p.getPrice()%></td>
	</tr>
	<tr>
		<td>Direccion:<%=p.getAddress()%></td>
	</tr>
	<tr>
		<td>Ciudad:<%=p.getCity()%></td>
	</tr>
	<tr>
		<td>Provincia:<%=p.getState()%></td>
	</tr>
	<tr>
		<td>Número de telefono:<%=p.getPhoneNumber()%></td>
	</tr>

	<tr>
		<td>Web:<%=p.getWeb()%></td>
	</tr>
	<tr>
		<td>Fax:<%=p.getFax()%></td>
	</tr>
	<%
		if (p.getOpinions().size() > 0) {
	%>
	<tr>
		<td>Opiniones: <%
			for (Opinion o : p.getOpinions()) {
		%>
		<tr>
			<td><%=o.getText()%></td>
			<td>Valoracion:<%=o.getValoration()%></td>
		</tr>
		<%
			}
			}
		%>
		</td>
	</tr>
	<%
		if (p.getPhotos().size() > 0) {
	%>
	<tr>
		<td>Fotos: <%
			for (Photo f : p.getPhotos()) {
		%>
		<tr>
			<td><%=f.getPhoto()%></td>
			<td>Fecha subida:<%=f.getUploadDate()%></td>
		</tr>
		<%
			}
			}
		%>
		</td>
	</tr>

</table>

<br>
<a href="FrontController?res=searchPlace.jsp">Volver a buscar</a>
</body>
</html>